﻿using Prism.Commands;
using Prism.Regions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PrismRegionComposite
{
    public class MainWindowViewModel
    {
        public DelegateCommand ShowPageCommand { get; set; }
        public CompositeCommand SaveAllCommand { get; set; }
        public MainWindowViewModel(IRegionManager regionManager,
            CompositeCommand compositeCommand) 
        {
            ShowPageCommand = new DelegateCommand(() =>
            {
                regionManager.RequestNavigate("ShowARegion", "ViewA");
                regionManager.RequestNavigate("ShowBRegion", "ViewB");
            });
            SaveAllCommand = compositeCommand;
            //SaveAllCommand.RegisterCommand(ShowPageCommand);
        }
    }
}
